#include <bits/stdc++.h>

using namespace std;
using ll = long long;
#define int long long

void solve()
{
    int x;
    cin >> x;
    string s = to_string(x);
    if (x <= 9) cout << 11 << endl;
    else
    {
        int a = s.size() - 1;
        int tmp = 1;
        cout << 1;
        for (int j = 0; j < a; j++) cout << 0;
        cout << 1;
        cout << endl;
    }
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}